﻿//name:worried trader
//who: by Jack Chen
//what: just make a logic for worried trader

#include <mudlib.h>
#include <daemons.h>
#include <ansi.h>


inherit MONSTER ;
	object ob;
	
	::create();
	set_level(temp); // temp used when attribute not decide yet 
	set ("long", @LONG
xx是專門進口國外物資的商人, 現在正在港口不斷的踱步, 或許你可以問問他
發生什麼事情了(matter) 
LONG) ;
	set_name("xx trader", "xx商人");
	set("unit", "位");
	set("gender", "male");  //here and above are real code
	
	//start of pseudo code ------------------------------------------------------------------------------------
	//
	
	if(ask trader about matter)
	{
		nowwhat(); //to indicate how far the player has been done or not
	}


	if (player accept)  //if player accept the quest
	{
	    Qstep=1;
		write("@MATT
你能幫我解決這個問題, 真是太好了. 可是要到達那裡混進去那群乞丐不是簡
單的事情,你可以去裁縫A那裡請他幫你準備乞丐袍, 到木工B那邊找到小船,
	MATT");
		quest_accepted = true;
	}
	
	if (player gives trader 車杉木 back) //if player give 車杉木 back to trader
	{
	    write("@MATT
沒錯, 就是這車杉木, 真是太感激了可以幫我找回這些貢品, 這是給你的酬勞
           , 我也會跟皇室報告你英勇的行為的.
MATT");
	}
	
	
void nowwhat() indicate how far the player have been done or not
{
	if(quest_accepted) //if this player has been accept, then check items required
	{
	    check_items()
	}
	
	if(quest_isn't_accept) //if this player hasn't accept yet, ask for accept
	{
		write("@MATT
進口的進口的高級白杉木被小乞丐群給偷走了, 找了好多人去尋找都無法拿回
現在無法對皇室神殿交代,怎麼辦才好呢?你能幫我找回嗎(accept)?
MATT");
	}
	
	if(quest_have_been_finished) //if this player has been finished this quest, thanks for him or her
	{
		write("謝謝這位大大,還好有您的幫忙押");
	}
}


	    
	
void check_items() //check items that required to get into vagrant's village
{
    if(this_player_has_vagrant_cloak && doesnt_have_a_boat)
	{
		return "你還缺少小船一艘, 沒有小船無法進到他們集會所."
	}
	
	if(this_player_have_a_boat && vagrant_cloak)
	{
	    return @MATT
你已經拿到外袍跟小船了嗎.真是太好了!他們有密道小船可以行駛在三角洲中
的小河道上,外袍記得要披著, 偽裝成乞丐比較不會被懷疑."
MATT;
	}
	
	if(this_player_doesn't_have_a_cloak)
	{
	    return "你沒準備乞丐穿的外袍的話是混不進去裡面的.";
	}
}